Ext.namespace("Hs.tamcx","Hs.util");
Ext.BLANK_IMAGE_URL = "./app/js/extjs/resources/images/default/s.gif";
/****************************************
 *   机构树
 * 	 需要继承 Ext.ux.ComboBoxTree
 * 	 @param {} config
 */
Hs.tamcx.OrgTree=function(config){
	Ext.applyIf(config,{
			hiddenName:'orgId',
			width : 200,
			tree : {
				xtype:'treepanel',
				loader:this.loader,
				root:this.root
	    	},
	    	emptyText:'请选择机构...',
			selectNodeModel:'exceptRoot'
	});
	this.loader=new Ext.tree.TreeLoader({dataUrl:'org.dict?subTranCode=tree'});
	this.root = new Ext.tree.AsyncTreeNode({id:'0',draggable:false,text:'机构树'});
	this.xtype='treepanel';
	this.orgLoader=function(){
		return loader;
	}
	this.orgRoot = function(){
		return root;
	}
}
Ext.extend(Hs.tamcx.OrgTree,Ext.ux.ComboBoxTree);
Ext.reg("hstamcxorgtree",Hs.tamcx.OrgTree);